<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>查看电话解决报告</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<link rel="stylesheet" href="../../../../css/mui.min.css">
		<link rel="stylesheet" href="../../../../css/global.css">
		<link rel="stylesheet" href="../../../../css/style.css">
		<link rel="stylesheet" href="../../../../css/mui.picker.css">
		<link rel="stylesheet" href="../../../../css/mui.poppicker.css">
		<style>
			button:disabled {
				opacity: 1;
			}
			.mui-btn-block{
				font-size: 16px;
				margin-bottom:0;
			    border: 0;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 id="title" class="mui-title">查看电话解决报告</h1>
		</header>
		<div class="mui-content" style="display: none;">
			<div class="details_con">
				<div hidden>
					<input type="hidden" id="id" />
					<input type="hidden" id="planId" />
					<input type="hidden" id="noticeId" />
					<input type="hidden" id="helpId" />
					<input type="hidden" id="isWarranty" />
					<input type="hidden" id="noticeServiceType" />
				</div>
				<div class="clum">
					<span class="name">服务编号</span>
					<span id="serviceNo" class="txt"></span>
				</div>
				<div class="clum autoHeight">
					<span class="name">故障<em class="t_red">*</em></span>
					<div class="clear"></div>
					<textarea id="problem" class="textarea" placeholder="请输入故障"></textarea>
				</div>
				<div class="clum autoHeight">
					<span class="name">工作过程</span>
					<div class="clear"></div>
					<textarea id="actionTaken" class="textarea" placeholder="请输入工作过程"></textarea>
				</div>
				<div class="clum">
					<span class="name">接收任务时间<em class="t_red">*</em></span>
					<button id='orderReceivedDate' class="selectDate" disabled="disabled"></button>
				</div>
				<div class="clum">
					<span class="name">电话开始时间<em class="t_red">*</em></span>
					<button id='callingStartDate' type="button" class="selectDate">请选择电话开始时间</button>
				</div>
				<div class="clum">
					<span class="name">电话结束时间<em class="t_red">*</em></span>
					<button id='callingEndDate' type="button" class="selectDate">请选择电话结束时间</button>
				</div>
				<!-- <div class="clum">
					<span ><em class="t_red">*</em>电话解决时间（小时）</span>
					<input type="number" onkeyup="clearNoNum(this)" id="equivalentToHuors"  placeholder="请输入电话解决时间" />
				</div> -->
				<div class="clum" style="height: auto;overflow: auto;">
					<!-- <div class="name" style="width: 100%;"><em class="t_red">*</em>电话解决时长（小时）</div>
					<div class="txt" style="height: auto;overflow: auto;width: 100%;">
						<input type="number" style="margin-bottom:0;width: 100%;" onkeyup="clearNoNum(this)" id="equivalentToHuors" class="d_ipt"  placeholder="请输入电话解决时长" />
					</div> -->
					<span class="name">解决时长(小时)<em class="t_red">*</em></span>
					<input type="number" style="margin-bottom:0;width: 100%;" onkeyup="clearNoNum(this)" id="equivalentToHuors" class="d_ipt"  placeholder="请输入解决时长" />
				</div>
				<div class="clum autoHeight">
					<span class="name">结果</span>
					<div class="clear"></div>
					<textarea id="result" class="textarea" placeholder="请输入结果"></textarea>
				</div>
				<div class="clum autoHeight">
					<span class="name">工程师建议</span>
					<div class="clear"></div>
					<textarea id="engineersAdvis" class="textarea" placeholder="请输入工程师建议"></textarea>
				</div>
				<div class="btn_box">
					<span id="listPorts" class="fl">备件列表</span>
					<span id="addPorts" class="fr red">添加备件</span>
				</div>
				<div style="height: 50px;"></div>
				<div class="line"></div>
				<div class="clum">
					<span class="name">服务结果<em class="t_red">*</em></span>
					<input type="hidden" id="serviceResults" />
					<span class="txt">
						<button id='serviceResultsName' class="mui-btn mui-btn-block mui-btn-select" type='button'>请选择</button>
					</span>
				</div>
				<div class="clum" style="display: none;">
					<span class="name">中断类型<em class="t_red">*</em></span>
					<input type="hidden" id="suspendType" />
					<span class="txt">
						<button id='suspendTypeName' class="mui-btn mui-btn-block mui-btn-select" type='button'>请选择</button>
					</span>
				</div>
				<div class="clum" style="display: none;">
					<span class="name">中断子类型<em class="t_red">*</em></span>
					<input type="hidden" id="suspendSonType" class="d_ipt" />
					<span class="txt">
						<button id='suspendSonTypeName' class="mui-btn mui-btn-block mui-btn-select" type='button'>请选择</button>
					</span>
				</div>
				<div class="clum autoHeight" style="display: none;">
					<span class="name">工作中断原因<em class="t_red">*</em></span>
					<div class="clear"></div>
					<textarea id="workSuspendReason" maxlength="250" class="textarea" placeholder="请输入工作中断原因"></textarea>
				</div>
				<div class="clum" style="display: none;">
					<span class="name">工作类型<em class="t_red">*</em></span>
					<input type="hidden" id="workType" />
					<span class="txt">
						<button id='workTypeName' class="mui-btn mui-btn-block mui-btn-select" type='button'>请选择</button>
					</span>
				</div>
				<div class="clum autoHeight" style="display: none;">
					<span class="name">关注说明</span>
					<div class="clear"></div>
					<textarea id="concernReason" maxlength="1000" class="textarea" placeholder="请输入关注说明"></textarea>
				</div>
				<div class="line"></div>
				<div class="btn_box">
					<button id="saveBtn" class="fl" type="button">保存草稿</button>
					<button id="submitBtn" class="fr red" type="button">正式提交</button>
				</div>
				<div style="height: 50px;"></div>
			</div>

		<!-- js代码 start -->

		<!-- 基础js start -->
		<script src="../../../../js/mui.min.js"></script>
		<script src="../../../../js/utils/h.js"></script>
		<script src="../../../../js/constant.js"></script>
		<script src="../../../../js/common.js"></script>
		<script src="../../../../js/utils/base64.js"></script>
		<script src="../../../../js/utils/md5.js"></script>
		<script src="../../../../js/utils/sortMap.js"></script>
		<script src="../../../../js/utils/http.js"></script>
		<script src="../../../../js/app.js"></script>
		<!-- 基础js end -->
		<script src="../../../../js/utils/rolldate.min.js"></script>
		<script src="../../../../js/mui.picker.js"></script>
		<script src="../../../../js/mui.poppicker.js"></script>
		<script src="../../../../js/sqliteTools.js"></script>
		<script src="../../../../js/fse/service/report/phone/phone.js"></script>
		<script type="text/javascript" charset="utf-8">
			/*
				app.jumpTo("view/service/report/phone/edit.html",
					"view/service/report/phone/edit.html", {
						reportGuid: '5'
					})
			*/
			// 提交状态 0未提交 1已提交
			var submitStatus = 0;
			
			(function($, doc) {
				$.init();

				$.plusReady(function() {
					var self = plus.webview.currentWebview();
					submitStatus = self.submitStatus;
					// 获取上一个页面传过来的参数并显示到页面
					viewPhone(self.reportGuid)

					// 初始化时间控件
					initDateTimeControls()
					// 初始化点击事件
					initClickEvent()

					// 保存草稿按钮触发事件
					h('#saveBtn').tap(function() {
						app.hideSoftKeybord()
						h('#saveBtn').attr('disabled','disabled');
						app.showWaiting('正在保存...')
						updateSaveData()
					})

					// 正式提交按钮触发事件
					h('#submitBtn').tap(function() {
						app.hideSoftKeybord()
						h('#submitBtn').attr('disabled','disabled');
						app.showWaiting('正在提交...')
						updateSaveData(function() {
							submitCC()
						})
					})
				});
			}(mui, document));
		</script>
		<!-- js代码 end -->
	</body>
</html>
